/**
 * 
 */
package org.apache.struts2.gtgrid;

import java.util.List;
import java.util.Map;

import net.sf.json.JSONArray;

import org.apache.struts2.gtgrid.model.GtColumnInfo;
import org.apache.struts2.gtgrid.model.GtFilterInfo;
import org.apache.struts2.gtgrid.model.GtGridInfo;
import org.apache.struts2.gtgrid.model.GtPageInfo;
import org.apache.struts2.gtgrid.model.GtSortInfo;

/**
 * inject gt-grid objects in action
 * 
 * @author Stevie
 * @since 2009-12-3
 * @version 1.0
 * 
 */
public interface GtGridAware<T> {
	// all
	public void setGridInfo(GtGridInfo gridInfo);
	@SuppressWarnings("unchecked")
	public void setParameterMap(Map parameterMap);

	// load
	public void setPageInfo(GtPageInfo pageInfo);

	public void setPageData(List<T> pageData);
	
	public void setSortInfos(List<GtSortInfo> sortInfos);

	public void setFilterInfos(List<GtFilterInfo> filterInfos);

	// export
	public void setColumnInfos(List<GtColumnInfo> columnInfos);

	// save
	public void setInsertedRecords(JSONArray insertedRecords);

	public void setDeletedRecords(JSONArray deletedRecords);

	public void setUpdatedRecords(JSONArray updatedRecords);
}
